const configuration = {
  state: {
    INITIAL:import.meta.env.VITE_APP_TITLE,
    THEME:'#409eff',//主题色
    SIDE_THENT:'theme-dark',//主题风格 theme-dark theme-light
    TOP_NAV:false,//顶部导航栏
    TAGES_VIEW:true,//头部下面导航
    FIXED_HEADER:true,//固定头部
    SIDEBAR_LOGO:true,//log标题是否显示
    DP_TITLE:false,//是否动态标题

    MENU_COLLAPSE:false,//菜单展开缩小

    // ROUTER_RECORD:[],//打开过的路由记录 暂不启用

  },
  mutations: {
    CHANGE_THEME: (state, txt) => {
      if(!txt)return;
      state.THEME = txt;
      // document.documentElement 是全局变量时
      const el = document.documentElement;
      // 获取 css 变量 getComputedStyle(el).getPropertyValue(`--el-color-primary`)
      // 设置 css 变量
      el.style.setProperty('--el-color-primary', txt)
    },
    CHANGE_SIDE_THENT: (state, txt) => {
      state.SIDE_THENT = txt
    },
    CHANGE_TOP_NAV: (state, value) => {
      state.TOP_NAV = value
    },
    CHANGE_TAGES_VIEW: (state, value) => {
      state.TAGES_VIEW = value
    },
    CHANGE_FIXED_HEADER: (state, value) => {
      state.FIXED_HEADER = value
    },
    CHANGE_SIDEBAR_LOGO: (state, value) => {
      state.SIDEBAR_LOGO = value
    },
    CHANGE_DP_TITLE: (state, value) => {
      state.DP_TITLE = value
    },
    // 修改菜单
    CHANGE_MENU_COLLAPSE: (state) => {
      state.MENU_COLLAPSE = !state.MENU_COLLAPSE;
    },
  },
  actions: {

  }
}

export default configuration